package com.sogou.qadev.service.login.client.event;

public class EventProxy implements com.sogou.qadev.service.login.client.event.Event {
  private String _endpoint = null;
  private com.sogou.qadev.service.login.client.event.Event event = null;
  
  public EventProxy() {
    _initEventProxy();
  }
  
  private void _initEventProxy() {
    try {
      event = (new com.sogou.qadev.service.login.client.event.EventServiceLocator()).getEvent();
      if (event != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)event)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)event)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (event != null)
      ((javax.xml.rpc.Stub)event)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public com.sogou.qadev.service.login.client.event.Event getEvent() {
    if (event == null)
      _initEventProxy();
    return event;
  }
  
  public long addEvent(long keyId, long productId, java.lang.String eventName) throws java.rmi.RemoteException{
    if (event == null)
      _initEventProxy();
    return event.addEvent(keyId, productId, eventName);
  }
  
  public boolean removeEvent(long keyId, long eventId) throws java.rmi.RemoteException{
    if (event == null)
      _initEventProxy();
    return event.removeEvent(keyId, eventId);
  }
  
  public long addEventUser(long keyId, long eventId, java.lang.String username, int popedom) throws java.rmi.RemoteException{
    if (event == null)
      _initEventProxy();
    return event.addEventUser(keyId, eventId, username, popedom);
  }
  
  public boolean removeEventUser(long keyId, long eventId, long userId, int popedom) throws java.rmi.RemoteException{
    if (event == null)
      _initEventProxy();
    return event.removeEventUser(keyId, eventId, userId, popedom);
  }
  
  public long addEventGroup(long keyId, long eventId, java.lang.String groupName, int popedom) throws java.rmi.RemoteException{
    if (event == null)
      _initEventProxy();
    return event.addEventGroup(keyId, eventId, groupName, popedom);
  }
  
  public boolean removeEventGroup(long keyId, long eventId, long groupId, int popedom) throws java.rmi.RemoteException{
    if (event == null)
      _initEventProxy();
    return event.removeEventGroup(keyId, eventId, groupId, popedom);
  }
  
  public boolean renameEvent(long keyId, long eventId, java.lang.String neweventName) throws java.rmi.RemoteException{
    if (event == null)
      _initEventProxy();
    return event.renameEvent(keyId, eventId, neweventName);
  }
  
  public com.sogou.qadev.service.login.bean.Event queryEvent(long keyId, long eventId) throws java.rmi.RemoteException{
    if (event == null)
      _initEventProxy();
    return event.queryEvent(keyId, eventId);
  }
  
  public com.sogou.qadev.service.login.bean.Event[] queryEvents(long keyId, long productId, long userOrGroupId, int lines, int pageNumber, boolean isUserId) throws java.rmi.RemoteException{
    if (event == null)
      _initEventProxy();
    return event.queryEvents(keyId, productId, userOrGroupId, lines, pageNumber, isUserId);
  }
  
  public com.sogou.qadev.service.login.bean.Event[] queryUserEvents(long keyId, long productId, long userId, int lines, int pageNumber) throws java.rmi.RemoteException{
    if (event == null)
      _initEventProxy();
    return event.queryUserEvents(keyId, productId, userId, lines, pageNumber);
  }
  
  public com.sogou.qadev.service.login.bean.Event[] queryGroupEvents(long keyId, long productId, long groupId, int lines, int pageNumber) throws java.rmi.RemoteException{
    if (event == null)
      _initEventProxy();
    return event.queryGroupEvents(keyId, productId, groupId, lines, pageNumber);
  }
  
  
}